package com.vil.mapper;

import com.vil.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.awt.*;
import java.util.List;

@Mapper
@Repository
public interface AdminMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Admin record);

    int insertSelective(Admin record);

    Admin selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Admin record);

    int updateByPrimaryKey(Admin record);


    //登录验证
    Admin loginCheck(@Param("login_code")String login_code, @Param("password")String password);


    //判断用户名是否存在
    @Select("select count(1) from admin where login_code = #{login_code}")
    int isExist(@Param("login_code")String login_code);

    List<Admin> getListByManyCondition(String login_code);

    List<Admin> getListByManyConditions(Admin admin);
    //批量删除
    int deleteMany(Long[] array);



}